package ch06;

public class PurseTester {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Purse purse = new Purse();
		purse.addCoin("Quater");
		purse.addCoin("Dime");
		purse.addCoin("Nickel");
		purse.addCoin("Dime");
		
		System.out.println("Purse toString test:");
		System.out.println(purse.toString());
		
		System.out.println();
		
		System.out.println("Purse reverse test:");
		purse.reverse();
		System.out.println(purse.toString());
		
		System.out.println();
		
		System.out.print("Create new Purse called Other: ");
		Purse other = new Purse();
		other.addCoin("Dime");
		other.addCoin("Nickel");
		System.out.println(other.toString());
		System.out.println("Purse transfer test");
		purse.transfer(other);
		System.out.println("Other: " + other.toString());
		System.out.println("Purse: " + purse.toString());

		System.out.println();
		
		
		System.out.println("Create new Purse called yetAnother with same content as purse: ");
		Purse yetAnother = new Purse();
		yetAnother.addCoin("Dime");
		yetAnother.addCoin("Nickel");
		yetAnother.addCoin("Dime");
		yetAnother.addCoin("Quater");
		yetAnother.addCoin("Dime");
		yetAnother.addCoin("Nickel");
		System.out.println("yetAnother: " + yetAnother.toString());
		System.out.println("Purse sameContents test:");
		if(purse.sameContents(yetAnother)){
			System.out.println("sameCoins works");
		} else {
			
		}
		
		
	}

}
